package com.jkgj.skykingkong.tms.domain.model.entity;

import com.jkgj.skykingkong.tms.domain.model.rbac.User;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.data.ebean.domain.AbstractEntity;
import org.springframework.data.ebean.domain.AggregateRoot;

import javax.persistence.*;
import java.util.Date;


/**
 * @Author: Created by sunjh
 * @Decription:
 * @Date: Created in 19:33  2017/9/19 0019.
 * @Modified:
 */
@Getter
@Setter
@Entity
@Table(name="tbl_consultation")
@AllArgsConstructor
@NoArgsConstructor
@AggregateRoot
public class Consultation extends AbstractEntity {

    //会诊服务端id
    @ManyToOne
    @JoinColumn(name = "SERVER_ID")
    private User server;

    //会诊客户端id
    @ManyToOne
    @JoinColumn(name = "CLIENT_ID")
    private User client;

    //开始时间
    private Date startTime;

    //结束时间
    private Date endTime;

    //会诊客户端
    private String channel;

    //状态  1 等待中 2 会诊中 3 已结束
    private Integer status;

    //会诊创建时间
    private Date createTime;
}
